package com.pap.base.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;

import com.pap.base.mapper.BaseMapper;
import com.pap.base.service.IBaseService;

public class BaseServiceImpl<T> implements IBaseService<T> {

	@Autowired(required=false)
	protected BaseMapper<T> mapper;
	
	
	@Override
	public int deleteByPrimaryKey(String limitId) {
		
		return mapper.deleteByPrimaryKey(limitId);
		
	}

	@Override
	public int selectCountByMap(Map<Object, Object> map) {
		return mapper.selectCountByMap(map);
		
	}

	@Override
	public List<T> selectListByMap(Map<Object, Object> map) {
		
		
		return	mapper.selectListByMap(map);
	
	}

	@Override
	public int insert(T record) {
		
		return mapper.insert(record);
	
	}

	@Override
	public int insertSelective(T record) {
	
		return	mapper.insertSelective(record);
	
	}

	@Override
	public T selectByPrimaryKey(String limitId) {
		
		return 	mapper.selectByPrimaryKey(limitId);
		
	}

	@Override
	public int updateByPrimaryKeySelective(T record) {
		
		return mapper.updateByPrimaryKeySelective(record);
		
	}

	@Override
	public int updateByPrimaryKey(T record) {
	
		return 	mapper.updateByPrimaryKey(record);
		
	}

}
